Skip to main content

All Questions

3votes
1answer
90views

Session Logic for User Verification in Rails Migration

This is a logic to create sessions on RoR 7.1.2 based on the last version of the website which was in vanilla PHP, with the upgrade I have to deal with the users that were already signed up but not ...
ZAMA's user avatar
4votes
3answers
125views

App to seed DB, generate CSVs, and export individually or in complex zip files Rails 5

I have an app whose sole purpose is to seed data files and add the data to different CSVs which are zipped and exported by the user. My application controller is filled with lines that all look like ...
atayl16's user avatar
3votes
0answers
117views

Retrieving data from the movie database

I am trying to retrieve the series, seasons and episodes from the movie database, however I am pretty new to Ruby on rails and I feel like what I am doing could be improved a lot. I use an ...
L. Faros's user avatar
2votes
0answers
68views

Counting how many questions in each category are tagged

I have a homepage that shows how many questions are in a certain category which is done through tagging. The functionality is working great, it tells me how many of each there are. However, newrelic'...
mazing's user avatar
3votes
2answers
92views

Rails method to match users according to language fluency level

This code works fine, but I'm still learning, and feel like there is a more Railsy way to write this. Is there a good rails ActiveRecord method I should learn more about? Please let me know if you ...
gwalshington's user avatar
2votes
2answers
98views

Build Hash with 2 input variables

I have a case that looks like this : John has 120 candies, He needs some plastic bags and marks each plastic bag with the number and puts 50 candies in each bag. So John can only fill up to 3 plastic ...
itx's user avatar
  • 269
0votes
1answer
734views

Displaying job status in a jQuery Datatable

I was wondering if there was a better way to write this: ...
Wes's user avatar
  • 133
3votes
1answer
87views

List enrolled users & show checkmark if all activities are complete

I'm a beginner with rails working on a rails 4 project to use with my students. Users enroll in lessons; on enrollment, four activities are created for each user (expositions, scrambled, dictations, ...
gonzalo2000's user avatar
1vote
1answer
73views

Rails query for all questions in tournaments that a user participates in

I'm new to rails and this is the situation I'm in: I have a User model that has many tournaments, a Tournament has many users ...
user avatar
2votes
2answers
112views

Rating the quality of a response based on the number of typos

I have this method which returns the number, but Rubocop said: Assignment Branch Condition size for rating is too high. [15.84/15] ...
Pavel's user avatar
4votes
1answer
4kviews

Managing users and profiles in Rails

I am building a Rails marketplace application using TDD. I would like to get advice on the way in which I have built the User associated ...
Ben Hawker's user avatar
2votes
0answers
66views

Modeling a temperature recording device in Rails

The app will allow users to login and upload a CSV file that contains temperature data from a device. This data will be stored and the user can view all these downloads and select one from a list to ...
Kazi's user avatar
6votes
1answer
4kviews

Using Rails concerns for validation in models

This is my first Rails project. I have read about concerns which are a great tool, but I am confused about how I should redesign my models. Some models have similar fields, but the validations are ...
Bóta László's user avatar
6votes
1answer
848views

React.js components for a golf app

I've recently started to look into React. I feel like I'm understanding it, but I want to make sure I'm doing the best practices before I make too many bad habits. I'm using the ...
Samuel Cambridge's user avatar
4votes
1answer
660views

Saving nested JSON to db, inferring order and record deletion

I've written a method for an API call that updates a store menu. It takes JSON as input, in the following format: ...
jperl's user avatar

153050per page
close